package beans;

import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.beans.VetoableChangeListener;
import java.beans.VetoableChangeSupport;
import java.io.Serializable;

public class Reunion implements Serializable {

	private static final long serialVersionUID = 1096232061571478176L;

	private int numReunion;
	private String libelle;
	private Jours dateReunion;
	private int horaireDebut;
	private int horaireFin;
	private Salle salle;
	
	PropertyChangeSupport changeSupport;
	VetoableChangeSupport vetoableSupport;
	
	public Reunion() {}
	
	public Reunion(int numReunion, String libelle, Jours dateReunion,
			int horaireDebut, int horaireFin, Salle salle) {
		super();
		this.numReunion = numReunion;
		this.libelle = libelle;
		this.dateReunion = dateReunion;
		this.horaireDebut = horaireDebut;
		this.horaireFin = horaireFin;
		this.salle = salle;
	}

	public int getHoraireFin() {
		return horaireFin;
	}

	public void setHoraireFin(int horaireFin) {
		this.horaireFin = horaireFin;
	}
	
	public int getNumReunion() {
		return numReunion;
	}
	
	public void setNumReunion(int numReunion) {
		this.numReunion = numReunion;
	}
	
	public String getLibelle() {
		return libelle;
	}
	
	public void setLibelle(String libelle) {
		this.libelle = libelle;
	}
	
	public Jours getDateReunion() {
		return dateReunion;
	}
	
	public void setDateReunion(Jours dateReunion) {
		this.dateReunion = dateReunion;
	}
	
	public int getHoraireDebut() {
		return horaireDebut;
	}
	
	public void setHoraire(int horaire) {
		this.horaireDebut = horaire;
	}
	
	public Salle getSalle() {
		return salle;
	}
	
	public void setSalle(Salle salle) {
		this.salle = salle;
	}
	
	public synchronized void addPropertyChangeListener(PropertyChangeListener listener) {
		changeSupport.addPropertyChangeListener(listener);
	}
	
	public synchronized void removePropertyChangeListener(PropertyChangeListener listener) {
		changeSupport.removePropertyChangeListener(listener);
	}
	
	public synchronized void addVetoableChangeListener(VetoableChangeListener listener) {
		vetoableSupport.addVetoableChangeListener(listener);
	}
	
	public synchronized void removeVetoableChangeListener(VetoableChangeListener listener) {
		vetoableSupport.removeVetoableChangeListener(listener);
	} 
}
